1. Field of the Invention
The present invention relates to a computation apparatus and method, a quantization apparatus and method, and a program. In particular, the invention relates to a computation apparatus and method, a quantization apparatus and method, and a program with which a memory capacity used for a processing can be reduced.
2. Description of the Related Art
To deal with an analog signal in a digital signal processing, in addition to a sampling processing for performing a discretization on a domain of the signal, a quantization processing for performing a discretization on a range of the signal is carried out. Also, in a case where the digital signal already subjected to the discretization on the range is dealt with at a still smaller amount of data, a still rougher discretization is carried out in some cases, and this process is also included in the quantization processing. In the quantization processing, a value after the discretization is referred to as quantized value, and a code to which the quantized value is assigned is referred to as quantization code. Also, an interval between adjacent quantized values is referred to as quantization step width, and the number of the quantized values included in the range is referred to as the number of quantization steps.
On the other hand, in a case where the digital signal obtained as the result of the digital signal processing is output as an analog signal, for example, from the quantization code, a processing of reconstructing the original continuous values or the values subjected to the discretization at a small quantization step width is carried out. This process is referred to as inverse quantization processing. In the inverse quantization processing, the quantized values corresponding to the quantization code are converted through an inverse quantization conversion to reconstruct the original values.
At this time, the quantized values are obtained while the continuous values are approximate to the discrete values in the quantization processing, and accordingly errors between the reconstructed values through the inverse quantization processing (inverse quantized values) and the original values are generated through the quantization processing. Therefore, in the inverse quantization processing, the values before performing the quantization processing (values before the quantization) are not reconstructed in a completed manner, and the reconstructed inverse quantized values are approximate values including the quantization errors.
In general, in a case where the quantization step width is large, the quantization errors become large, but the number of the quantization steps becomes small. Thus, the data amount used for representing the quantization code becomes small. On the other hand, in a case where the quantization step width is small, the quantization errors become small, but the number of the quantization steps becomes large. Thus, the data amount used for representing the quantization code becomes large.
The quantization in which the quantization step width is constant is referred to as linear quantization. In contrast, the quantization in which the quantization step width is not constant is referred to as nonlinear quantization processing. As compared with the linear quantization processing, the nonlinear quantization processing has the following characteristics.
First, in a case where an appearance probability of the signals is biased, by carrying out a nonlinear quantization processing in which the quantization step width is set smaller in a vicinity of a value (signal) whose appearance probability is high and the quantization step width is set larger in a vicinity of a value (signal) whose appearance probability is low, it is possible to set the quantization errors smaller in average as compared with a linear quantization processing. Also, through a similar method, by adjusting the number of the quantization steps in accordance with the appearance probability of the signals, it is possible to reduce the data amount without deteriorating the average quantization errors as compared with the linear quantization processing.
Also, in particular, in the case of an audio signal or an image signal, while following characteristics of the acoustic sense and the visual sense, by setting the quantization step width smaller in a vicinity of a value to which human beings are sensuously responsive and the quantization step width larger in a vicinity of a value to which human beings are not sensuously responsive, it becomes difficult for the people to perceive the quantization errors as compared with the linear quantization processing. In addition, through a similar method, by adjusting the number of the quantization steps in accordance with the characteristics of the human sensory perception, as compared with the linear quantization processing, it is possible to reduce the data amount without deteriorating the errors perceived by the people.
Therefore, the nonlinear quantization processing is utilized in various fields dealing with the signals and the like conforming to the human sensuous characteristics such as the signal in which the appearance probability of the signals is biased, the audio signal, or the image signal.
Incidentally, for a system for coding the audio signal, an MPEG (Moving Picture Expert Group) audio standard is proposed. The MPEG audio standard includes a plurality of coding systems. In ISO/IEC (International Organization for Standardization/International Electrotechnical Commission) 13818-7, a coding system of MPEG-2 audio standard AAC (Advanced Audio Coding) is standardized.
Also, in the further expanded ISO/IEC 14496-3, a coding system of MPEG-4 audio standard AAC is standardized. It should be noted that hereinafter, the MPEG-2 audio standard AAC and the MPEG-4 audio standard AAC are collectively referred to as AAC standard.
An audio coding apparatus compliant with the AAC standard in a related art is provided with an auditory psychological model holding unit, a gain control unit, a spectrum processing unit, a quantization/coding unit, and a multiplexer unit.
In the auditory psychological model holding unit, the audio signal input to the audio coding apparatus is converted into blocks along the time axis and analyzed in conformity to the human auditory characteristics for each divided band so that a permissible error intensity of the respective divided bands is calculated.
Also, the input audio signal is divided into four frequency bands at regular intervals in the gain control unit, and a gain adjustment is performed on a predetermined band.
Furthermore, the audio signal after the gain adjustment is converted into spectrum data of the frequency domain in the spectrum processing unit, and a predetermined processing is applied on the basis of the permissible error intensity calculated by the auditory psychological model holding unit. Then, the spectrum data on which the predetermined processing is applied (the audio signal) is converted into a code string in the quantization/coding unit, and various types of information are multiplexed in the multiplexer unit to be output as a bit stream.
In the above-mentioned quantization/coding unit, the nonlinear quantization processing is performed on the audio signal.
Also, in the quantization processing on the audio signal, the quantization/coding unit performs the inverse quantization on the quantized values with respect to all the input values to check whether or not the quantization errors stay in a predetermined range. The quantization errors can be obtained by calculating a difference between the inverse quantized value and the input value, and in the quantization/coding unit, it is determined whether or not this difference takes a value in a predetermined range.
In the quantization processing or the inverse quantization processing described above, a method is proposed in which a table previously holding values of a conversion expression is prepared, and a conversion value is obtained with respect to the input value by referring to the table (for example, see Japanese Patent No. 3877683).
According to the method Japanese Patent No. 3877683, in a nonlinear inverse quantization processing, as the quantized value which is the input value is an integer value, by previously creating a relation between the quantized value serving as the input value and the inverse quantized value as an inverse quantization table, at the time of the execution of the inverse quantization processing, it is possible to uniquely decide the inverse quantized value on the basis of the inverse quantization table.
Similarly, in a nonlinear quantization processing too, by previously creating a relation as a quantization table between a quantized value Z and a range in which a value before the quantization serving as the input value may take, at the time of the execution of the quantization processing, it is possible to uniquely decide the quantized value on the basis of the quantization table.